package com.javaee.dao;

import com.javaee.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface userDao {


    @Select("select COUNT(*) FROM user WHERE name = #{name}")
    public int isnameExist(User user);

    @Update("insert into user (name,password) values (#{name},#{password})")
    public int register (User user);

    @Select("select password from user where name = #{name}")
    public String login (String name);
}
